package com.lkd.controller;

import com.lkd.base.BaseController;
import com.lkd.pojo.dto.LoginDto;
import com.lkd.pojo.vo.LoginUserVo;
import com.lkd.service.IUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/user-service/user")
@Api("登录接口")
public class LoginController extends BaseController {

    @Autowired
    private IUserService userService;

    @PostMapping("/login")
    @ApiOperation("登录方法")
    public LoginUserVo login(@RequestBody LoginDto dto){

       return userService.login(dto);
    }
}